package com.lyy.consolidate;


import java.sql.SQLOutput;

/**
 * @Author:  GZQ
 * @date:  2024/11/29 22:54
 * @description: 巩固练习3
 */

public class Employee { // 员工类  父类

    // 属性
    // 员工属性：姓名, 单日工作, 工作天数
    private String name;
    private double retry;
    private int workdays;
    // 分析出还有一个属性等级
    private double level;

    // 方法[构造器、getter 和 setter 方法]

    public Employee(String name, double retry, int workdays, double level) {
        this.name = name;
        this.retry = retry;
        this.workdays = workdays;
        this.level = level;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getRetry() {
        return retry;
    }

    public void setRetry(double retry) {
        this.retry = retry;
    }

    public int getWorkdays() {
        return workdays;
    }

    public void setWorkdays(int workdays) {
        this.workdays = workdays;
    }

    public double getLevel() {
        return level;
    }

    public void setLevel(double level) {
        this.level = level;
    }

    // 根据需求分析出打印工资方法
    // 方法名: printSalary
    // 返回值: void
    public void printSalary(){
        System.out.println("员工 " + name + " 的工资=" + retry * workdays * level + "元");;
    }
}
